
/*
 * @Author: shiguang
 * @Date: 2023-04-26 10:48:59
 * @LastEditors: yusha
 * @LastEditTime: 2023-08-25 13:32:55
 * @Description: 静态地址
 */
import { ROUTER_BASENAME } from '@/config/router';

export const getEnv = () => {
    if(window.location.port) {
        return {
            env: 'dev',
            prefix: 'dev-'
        };
    }
    if(!window.location.host.includes('-')){
        return {
            env: 'prod',
            prefix: ''
        };
    }
    const [env] = window.location.host.split('-');
    return {
        env,
        prefix: `${env}-`
    };
};

// export const STATIC_URL = {
//     login: `https://${getEnv().prefix}system.theckb.com/test/dev/login`,
// };


// if(window.location.port){
//     STATIC_URL.login = `//localhost:${window.location.port}${ROUTER_BASENAME}/dev/login`;
// }